package com.ruoyi.peach.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.peach.mapper.FarmingMapper;
import com.ruoyi.peach.domain.Farming;
import com.ruoyi.peach.service.IFarmingService;

/**
 * 农事Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-04
 */
@Service
public class FarmingServiceImpl implements IFarmingService 
{
    @Autowired
    private FarmingMapper farmingMapper;

    /**
     * 查询农事
     * 
     * @param id 农事主键
     * @return 农事
     */
    @Override
    public Farming selectFarmingById(Long id)
    {
        return farmingMapper.selectFarmingById(id);
    }

    /**
     * 查询农事列表
     * 
     * @param farming 农事
     * @return 农事
     */
    @Override
    public List<Farming> selectFarmingList(Farming farming)
    {
        return farmingMapper.selectFarmingList(farming);
    }

    /**
     * 新增农事
     * 
     * @param farming 农事
     * @return 结果
     */
    @Override
    public int insertFarming(Farming farming)
    {
        return farmingMapper.insertFarming(farming);
    }

    /**
     * 修改农事
     * 
     * @param farming 农事
     * @return 结果
     */
    @Override
    public int updateFarming(Farming farming)
    {
        return farmingMapper.updateFarming(farming);
    }

    /**
     * 批量删除农事
     * 
     * @param ids 需要删除的农事主键
     * @return 结果
     */
    @Override
    public int deleteFarmingByIds(Long[] ids)
    {
        return farmingMapper.deleteFarmingByIds(ids);
    }

    /**
     * 删除农事信息
     * 
     * @param id 农事主键
     * @return 结果
     */
    @Override
    public int deleteFarmingById(Long id)
    {
        return farmingMapper.deleteFarmingById(id);
    }
}
